#ifndef __WIZ_VFS_BLOCKSTORAGE_CHUNK_HPP__SHANHAOBO_19800429__
#define __WIZ_VFS_BLOCKSTORAGE_CHUNK_HPP__SHANHAOBO_19800429__

#include "./WizVFSBlockStorageBlock.hpp"

namespace Wiz
{
    namespace VFS
    {
        namespace BlockStorage
        {
            /// Declare
            struct Type;
            //////////////////////////////////////////////////////////////////////////

            namespace Chunk
            {
                struct Type : public ::Wiz::VFS::BlockStorage::ChunkWriteBack::Type
                {
                    typedef ::Wiz::VFS::BlockStorage::ChunkWriteBack::Type tSuper;
                    Type()
                    {

                    }
                    Type(tSuper& InS) : tSuper(InS)
                    {

                    }
                    ::Wiz::Void::Type       Write(::Wiz::VFS::BlockStorage::Param::InOut);
                    ::Wiz::Void::Type       Read(::Wiz::VFS::BlockStorage::Param::InOut);

                    ::Wiz::Void::Type       Remove(::Wiz::VFS::BlockStorage::Param::InOut);

                    ::Wiz::Void::Type       SetPosition(::Wiz::UInt32::In ChunkID, ::Wiz::UInt32::In ChunkCompleteSize)
                    {
                        m_Position = 
                            sizeof(::Wiz::VFS::BlockStorage::StorageInfo::Type) +
                            ChunkID * ChunkCompleteSize;
                    }
                protected:
                    friend struct ::Wiz::VFS::BlockStorage::Type;
                    ::Wiz::Void::Type       WriteInfoAndAdvance(::Wiz::VFS::BlockStorage::Param::InOut);
                    ::Wiz::Void::Type       ReadInfoAndAdvance(::Wiz::VFS::BlockStorage::Param::InOut);
                };
            } /// end of namespace Chunk

            //////////////////////////////////////////////////////////////////////////
        } /// end of namespace BlockStorage
    } /// end of namespace VFS
} /// end of namespace Wiz


#endif /*__WIZ_VFS_BLOCKSTORAGE_CHUNK_HPP__SHANHAOBO_19800429__*/
